1. Field of the Invention
The present invention generally relates to asynchronous clock technology, and more specifically to pointers associated with asynchronous clock domains.
2. Background
An electronic device generally performs operations based on a clock. The clock is often generated internally by the device, though the clock can be based on an external clock, such as a clock of another device. Clocks of different devices can be synchronized or unsynchronized. Unsynchronized clocks are known as “asynchronous clocks”. Asynchronous clocks need not operate at different frequencies. For instance, the phase of one clock can differ from the phase of another clock having the same frequency.
Information is often temporarily stored in a memory, such as a register, when being transferred between devices having asynchronous clocks. A first device can write the information to the register, and a second device can read the information from the register. The first device uses a write pointer to specify the address of the register at which the information is to be written. The second device uses a read pointer to specify the address of the register at which the information is to be read. The addresses of the register are typically multi-bit addresses.
The address of the write pointer and the address of the read pointer are often compared to determine whether the read pointer is properly aligned to read the information written by the first device. Comparing the multiple-bit pointers typically requires multiple clock cycles. However, at high frequencies, the addresses of the pointers can change at every clock cycle. The pointers can become unstable because the addresses of the pointers cannot be accurately determined.
What is needed is a method and apparatus to compare pointers associated with asynchronous clock domains.